package net.valerijtimakov.homefinances.dao.storages.finances;

import java.util.Date;
import java.util.Map;
import net.valerijtimakov.homefinances.domain.finances.CostsItem;
import net.valerijtimakov.homefinances.exceptions.AppExceptionWrongState;
import net.valerijtimakov.homefinances.exceptions.AppPersProviderException;
import net.valerijtimakov.homefinances.exceptions.AppPersistentException;
import net.valerijtimakov.homefinances.exceptions.wrongarg.AppExceptionNullArgument;

public interface ICostsStorage {
	Map<Long, CostsItem> filterCosts(long[] accountsIds, long[] cathegoriesIds, 
		long[] currenciesIds, Date addDateFrom, Date addDateTo, float costFrom, 
		float costTo, String namePattern) throws AppPersProviderException, AppExceptionWrongState;
	Map<Long, CostsItem> getAccountsCosts(long ... accountId) throws AppPersProviderException, AppExceptionWrongState;
	Map<Long, CostsItem> getCosts(long ... id) throws AppPersProviderException, AppExceptionWrongState;
	void addCost(CostsItem item) throws AppExceptionNullArgument, AppExceptionWrongState, AppPersistentException;
	void removeCost(long id) throws AppPersProviderException, AppExceptionWrongState;
	void updateCost(CostsItem item) throws AppPersProviderException, AppExceptionWrongState;
}
